package top.superflow.context.manage

import java.io.File

import org.springframework.stereotype.Component
import top.superflow.constant.GlobalConst
import top.superflow.context.manage.api.{BackupConfig, ContextManager, MigrateConfig, MigrateResult}
import top.superflow.utils.SuperflowENVUtil

@Component
class DBContextManager extends ContextManager{
  
  def backup(backupConfig: BackupConfig): String = ???
  def contextExisting(): Boolean = {
    new File(getContextHome).exists()
  }
  
  def isConsistency() : Boolean = {
      true
  }
  
  
  def dryMigrate(migrateConfig: MigrateConfig): MigrateResult = ???
  
  def getContextHome(): String = {
    SuperflowENVUtil.getAssuredProperty(GlobalConst.SYSTEM_ENV_VAR_DB_HOME)
  }
  def isMigratable(): Boolean = ???
  
  def migrate(migrateConfig: MigrateConfig): MigrateResult = ???
  def resetContext(): String = ???
  
  def compareMetadata(): top.superflow.context.manage.api.CompareResult = ???
  def loadCurrentMetadata(): top.superflow.context.api.ContextMetadata = ???
  def loadExistingMetadata(): top.superflow.context.api.ContextMetadata = ???

}